package com.yjt.javatest.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yjt.javatest.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * (Category)表数据库访问层
 *
 * @author makejava
 * @since 2023-09-14 13:38:11
 */
@Mapper
public interface CategoryMapper extends BaseMapper<Category> {
    @Select("select id from category where father_id = 0 and user_id = #{userId}")
    Integer getRootCategoryId(Long userId);
}

